<?php  //print_r(Controller::$on_menu); print_r($this->on); exit; // print_r($this->params);exit; ?><ul><?php
foreach($this->params as $key=>$vo){
    if(!isset($vo['list'])){
    ?><li <?php  if(isset($this->on[0])&&isset($vo['id'])&&
            $vo['id']==$this->on[0])
        { echo 'class="active"';} ?>><a href="<?php echo $vo['href'] ?>"><i class="icon <?php echo $vo['ico'] ?>"></i> <span><?php echo $vo['text'] ?></span></a> 
    </li><?php }
    else{
        ?><li class="submenu <?php $dli=isset($this->on[0])&&isset($vo['id'])&&$vo['id']==$this->on[0]; 

      ///  echo '*********';  
      //  echo $this->on[0];
     ////   echo ''.$vo['id'];  
        if($dli){   echo 'active';} ?>">
            <a href=""><i class="icon <?php echo $vo['ico'] ?>"></i>
                <span><?php echo $vo['text'] ?></span>
                <span class="label label-important"><?php echo count($vo['list']); ?></span>
            </a>
        <ul <?php if($dli){echo 'style="display: block;"';} ?> ><?php foreach($vo['list'] as $ikey=>$ivo){ ?>
            <li <?php  if(isset($this->on[1])&&isset($ivo['id'])&&
                    $ivo['id']==$this->on[1]) {echo 'class="li_on"';} ?>>
                <a title="<?php echo isset($ivo['title'])?$ivo['title']:""; ?>"  href="<?php echo $ivo['href']; ?>"><?php echo $ivo['text'] ?></a>
            </li><?php } ?>
      </ul>
    </li><?php
    }
}
?>